package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户账户
 * </p>
 * @author ding
 * @since 2020-06-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_company_account")
public class CompanyAccountDo extends Model<CompanyAccountDo> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("company_id")
    private Long companyId;

    /**
     * 账户余额
     */
    @TableField("company_account")
    private double companyAccount;

    /**
     * 账户余额
     */
    @TableField("company_account_rmb")
    private double companyAccountRmb;

    /**
     * 最大欠款
     */
    @TableField("max_limit")
    private double maxLimit;

    /**
     * 信用额度
     */
    @TableField("credit_points")
    private int creditPoints;

    /**
     * 是否欠款
     */
    @TableField("due_flag")
    private Integer dueFlag;

    @TableField("create_by")
    private Long createBy;

    @TableField("create_time")
    private Date createTime;

    @TableField("update_by")
    private Long updateBy;

    @TableField("update_time")
    private Date updateTime;

    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
